import base from '@/api/baseurl';
import request from '@/utils/request'

export function fetchBasicCurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BasicCurve/findBasicCurve',
    method: 'get',
    params: query
  })
}


//导出
export function BasicCurveExport(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BasicCurve/BasicCurveExport',
    method: 'get',
    params: query
  })
}


export function fetchListuserlp(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findoneTransfercurveuserlp',
    method: 'get',
    params: query
  })
}

export function fetchListcurr(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findoneTransfercurvecurr',
    method: 'get',
    params: query
  })
}

//拟合曲线方式下拉框
export function findcurvetypeall(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BasicCurve/findcurvetypeall',
    method: 'get',
    params: query
  })
}


//单行删除
// export function deleteBasicCurve(query) {
//   return request({
//     baseURL: base.appBaseApi,
//     url: '/BasicCurve/delBasicCurve',
//     method: 'get',
//     params: query
//   })
// }
export function deleteBasicCurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/newdelete/basicsDeleteConditionService',
    method: 'get',
    params: query
  })
}


export function addBasicCurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BasicCurve/addBasicCurve',
    method: 'post',
    data
  })
}

export function updateBasicCurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BasicCurve/updateBasicCurve',
    method: 'post',
    data
  })
}

export function batchDeleteBasicCurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BasicCurve/delManyBasicCurve',
    method: 'post',
    data
  })
}





/**
 * 基础曲线设置的曲线编号
 * @param {*} query 
 * @returns 
 */
export function addbc_cv_code(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BasicCurve/addbc_cv_code',
    method: 'get',
    params: query
  })
}

